#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int fact(int n, int k)
{
	if (k <= 0)
		return 1;
	else
		return n * fact(n, k - 1);

}
int main()
{
	int n = 0;
	int k = 0;
	scanf("%d %d", &n, &k);
	int ret = fact(n, k);
	printf("%d", ret);
	return 0;
}